<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加小类</title>
<link href="css/jimu.css" type="text/css" rel="stylesheet"><!-- 基于网页地址条寻址 非目录寻址 -->
<script type="text/javascript">
	function add(){
		if(form3.a.value==""){
			alert("请输入小类名称");
			form3.a.focus(); 
			return false;
		}
	
	}

</script>
</head>
<body>
<!-- 头部包含文件 -->
<%@include file="../common/head.jsp" %>
 <table class="main">
	<tr>
		<td style="width:180px;vertical-align:top;">
			<%@include file="../common/menu.jsp" %>	
		</td>
		<td style="vertical-align:top;padding:20px">
			<p>添加新商品：</p>
				<form action="addSub.action" method="post" name="form3" onsubmit="return add();">
					<table class="formTbl">
					  <col style="width:150px"><col style="width:250px">
						<tr>
							<td>
							 	<%-- <select name="subtype.supertype.supertypeid" >
									<s:iterator value="superList">
										<option value="${supertypeid }">${supertypeid }.${typename }</option>
									</s:iterator>
								</select> --%>
								<s:select list="superList" name="subtype.supertype.supertypeid" listKey="supertypeid" listValue="typename" label="商品大类"/>
							</td>
						</tr>
						<tr>
							<td>小类名称:</td>
							<td>
								<input type="text" name="subtype.subtypename" id="a">
							</td>
						</tr>
						<tr>
							<td colspan="2">
								<input type="submit" value="提交">
								<input type="reset" value="重置">
							</td>
						</tr>
					</table>
				
				</form>
			
		</td>
	</tr>
</table> 
<%-- <s:form action="addSub" method="post">
	<s:text name="添加商品"/>
	<s:select label="大分类编号" list="subList" name="supertypeid" listkey="subtypeid" listvalue="supertypeid"/>
	<s:textfield label="小分类编号" required="true" requiredposition="left" name="subtype.subtypeid"/>
	<s:textfield label="小分类名称" required="true" requiredposition="left" name="subtype.subtypename"/>
	<s:submit value="提交"/>
		<s:reset value="重置"/>
</s:form> --%>
<%@include file="../common/tail.jsp" %>
</body>
</html>